import { axios as request  } from '@/utils/request'

export function getList({pid: companyId, params}) {
  return request({
    url: `api/company/${companyId}/linkman`,
    method: 'get',
    params
  })
}

export function get({id}) {
  return request({
    url: `api/company/linkman/single/${id}`,
    method: 'get'
  })
}

export function add({data}) {
  return request({
    url: 'api/company/linkman',
    method: 'post',
    data
  })
}

export function edit({data}) {
  return request({
    url: 'api/company/linkman',
    method: 'put',
    data
  })
}

export function del(id) {
  return request({
    url: `api/company/linkman/${id}`,
    method: 'delete'
  })
}

export function changeSeller({data}) {
  return request({
    url: 'api/company/linkman/owner-user',
    method: 'put',
    data
  })
}